<!doctype html>
<html>
<head>
    <include file="public/head"/>
    <title>微信公众号-菜单管理</title>
    <meta name="description" content="ThinkCMF微信公众号插件">
    <meta name="keywords" content="ThinkCMF微信公众号插件">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('Wechat://AdminIndex/index')}">基本信息配置</a></li>
        <li class="active"><a href="{:cmf_plugin_url('Wechat://AdminIndex/menuIndex')}">菜单管理</a></li>
        <li><a href="{:cmf_plugin_url('Wechat://AdminIndex/replyIndex')}">自定义回复</a></li>
    </ul>
    <div class="nav-tabs margin-top-10">
        <a href="javascript:parent.openIframeLayer('{:cmf_plugin_url('Wechat://AdminIndex/menuAdd')}','添加菜单',{area:['50%','81%']});" class="btn btn-primary">添加菜单</a>
        <a href="{:cmf_plugin_url('Wechat://Weixin/createMenu')}" class="btn btn-danger js-ajax-dialog-btn" data-msg="确定要同步到微信公众号菜单吗？">生成菜单</a>
    </div>
    <div class="common-form">
        <form method="post" class="js-ajax-form" action="#">
            <div class="table_list">
                <table width="100%" class="table table-hover">
                    <thead>
                    <tr>
                        <th width="100">ID</th>
                        <th width="100">排序</th>
                        <th width="100">状态</th>
                        <th width="250">菜单名称</th>
                        <th width="100">类型</th>
                        <th width="200">点击事件key</th>
                        <th>跳转链接</th>
                        <th width="120">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="menu" item="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.order}</td>
                            <td><eq name="vo.status" value="1">显示<else/>隐藏</eq></td>
                            <td>{$vo.name}</td>
                            <td>{$vo.type}</td>
                            <td>{$vo.event_key}</td>
                            <td>{$vo.url}</td>
                            <td>
                                <a href="javascript:parent.openIframeLayer('{:cmf_plugin_url('Wechat://AdminIndex/menuEdit',['id'=>$vo['id']])}','编辑菜单',{area:['50%','81%']});">修改</a> |
                                <a href="{:cmf_plugin_url('Wechat://AdminIndex/menuDel',['id'=>$vo['id']])}" class="js-ajax-delete">删除</a>
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
        </form>
    </div>
</div>
<include file="public/scripts"/>
</body>
</html>